<?php
// +-----------------------------------------------------
// | Name： 星空框架  实名认证信息检测
// +-----------------------------------------------------
// | Version: V5.0
// +-----------------------------------------------------
// | Author: xkyinzhe <zhonghuaxinxing@sina.cn>
// +-----------------------------------------------------
// | Time: 2021-05-13 10:31
// +-----------------------------------------------------
declare(strict_types=1);

namespace app\common\validate;

use think\Validate;

/**
 * @xk 实名认证信息检测
 */
class UserCheck extends Validate
{
  protected $rule=[
    'user_check_id' => 'require|number|min:1',
    'name' => 'require',
    'card_num' => 'require|idCard',
    'card_pic' => 'require',
    'card_pic_back' => 'require',
    'user_sn' => 'require'
  ];
  protected $message = [
    'user_check_id' => '请选择需要提交的实名信息',
    'name' => '请填写姓名',
    'card_num' => '请填写身份证号码',
    'card_pic' => '请上传身份证正面照片',
    'card_pic_back' => '请上传身份证反面照片',
    'user_sn' => '您还没有登录，请重新登录',
  ];
  protected $scene =[
    'create' => ['name','card_num','card_pic','card_pic_back','user_sn'],
    'edit' => ['user_check_id','name','card_num','card_pic','card_pic_back','user_sn']
  ];
}
